package com.service;

import com.mapper.GoodMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bean.GoodImg;
import com.mapper.GoodImgMapper;
import com.service.GoodImgService;
@Service
public class GoodImgServiceImpl extends ServiceImpl<GoodImgMapper, GoodImg> implements GoodImgService{

    @Autowired
    GoodImgMapper goodImgMapper;

    @Override
    public int insertGoodImg(GoodImg goodImg) {
        return goodImgMapper.insert(goodImg);
    }

    @Override
    public List<GoodImg> selectAllGoodImgByGoodId(int goodId) {
        Map<String, Object> map = new HashMap<>();
        map.put("good_id", goodId);
        return goodImgMapper.selectByMap(map);
    }
}
